<?
//pr($fields);

$divider=str_repeat ("-", 100)."\n";

echo $subject."\n";
echo $divider."\n";

foreach ($fields AS $field) 
{
	echo "$field->label:  "
		.(strstr($field->value, "\n") ? "\n" : "")
		.htmlspecialchars_decode($field->value)."\n";

}

echo  	"\n"
		.$divider
		."Отправлено со страницы: "
		."http://".$_SERVER['HTTP_HOST']. $_SERVER['REQUEST_URI']."\n"
		."Дата отправки:" 
		. date('j.m.Y  G:i:s')."\n"
		
		;
		